home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / arvis1 / logo.ctl < prev    next >
Text File  |  1999-10-09  |  2KB  |  72 lines

  1. VERSION 5.00
  2. Object = "{27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0"; "PICCLP32.OCX"
  3. Begin VB.UserControl Logo 
  4.    ClientHeight    =   2235
  5.    ClientLeft      =   0
  6.    ClientTop       =   0
  7.    ClientWidth     =   2820
  8.    ScaleHeight     =   2235
  9.    ScaleWidth      =   2820
  10.    Begin VB.Timer Timer1 
  11.       Left            =   0
  12.       Top             =   0
  13.    End
  14.    Begin VB.PictureBox MainPic 
  15.       AutoRedraw      =   -1  'True
  16.       AutoSize        =   -1  'True
  17.       BorderStyle     =   0  'None
  18.       Height          =   1635
  19.       Left            =   0
  20.       ScaleHeight     =   1635
  21.       ScaleWidth      =   1950
  22.       TabIndex        =   0
  23.       Top             =   0
  24.       Width           =   1950
  25.    End
  26.    Begin PicClip.PictureClip Animate 
  27.       Left            =   225
  28.       Top             =   225
  29.       _ExtentX        =   18521
  30.       _ExtentY        =   35719
  31.       _Version        =   393216
  32.       Rows            =   18
  33.       Cols            =   7
  34.    End
  35. End
  36. Attribute VB_Name = "Logo"
  37. Attribute VB_GlobalNameSpace = False
  38. Attribute VB_Creatable = True
  39. Attribute VB_PredeclaredId = False
  40. Attribute VB_Exposed = False
  41. ' this is used for the spinning Quad-Ball Logo.
  42. Dim Cell As Integer
  43. Private Sub Timer1_Timer()
  44.  MainPic.Picture = Animate.GraphicCell(Cell)
  45.  DoEvents
  46.  Cell = Cell + 1
  47.  If Cell > Int((7 * 18) - 1) Then Cell = 0
  48. End Sub
  49. Private Sub UserControl_Initialize()
  50.  ExitIt = False
  51.  ThisDir
  52.  Animate.Picture = LoadPicture("MadeBy.img")
  53.  MainPic.Picture = Animate.GraphicCell(0)
  54.  Resize
  55. End Sub
  56. ' if logo spins too fast then increase the value of speed
  57. Public Sub Start(Optional Speed As Integer = 50)
  58.  Timer1.Interval = Speed
  59.  Timer1.Enabled = True
  60. End Sub
  61. Public Sub StopAnimation()
  62.  Timer1.Enabled = False
  63. End Sub
  64. ' I used this sub so that the resize could be called outside of the control
  65. Public Sub Resize()
  66.  Width = MainPic.Width
  67.  Height = MainPic.Height
  68. End Sub
  69. Private Sub UserControl_Resize()
  70.  Resize
  71. End Sub
  72.